/**
 * Created by Taow on 2017/9/27.
 */
import Vue from 'vue'
import VueResource from 'vue-resource';
Vue.use(VueResource);

export default {
  /*
   *查询机构所有绑定设备
   */
  getAllBindDevice(pageSize,pageNum,data){
    return Vue.http.post("/deviceMonitor/m/deviceMonitor/getAllDeviceList/"+pageSize+"/"+pageNum,data);
  },

  /*
   *根据supperId查询设备类型
   */
  getAllDeviceTypes(supperId){
    return Vue.http.get("/deviceMonitor/m/deviceMonitor/getAllDeviceType/"+supperId);
  },

  /*
   *保存设备
   */
  saveDevice(data){
    return Vue.http.post("/deviceMonitor/m/deviceMonitor/bindDevice",data);
  },

  /*
   *查看设备详情
   */
  getDeviceDetail(deviceId){
    return Vue.http.get("/deviceMonitor/m/deviceMonitor/getDeviceBindInfo/"+deviceId);
  },

  /*
   *解绑
   */
  unbindDevice(deviceId){
    return Vue.http.post("/deviceMonitor/m/deviceMonitor/deleteBindDevice/"+deviceId);
  },

  /*
   *删除设备
   */
  deleteDevice(deviceId){
    return Vue.http.post("/deviceMonitor/m/deviceMonitor/deleteDevice/"+deviceId);
  },

  /*
   *获取供应商
   */
  getAllSupplier(){
    return Vue.http.get("/deviceMonitor/m/deviceMonitor/getAllSupplier");
  },


  /*
   * 查询机构名称
   */
  getOrgName(){
    return Vue.http.get("/deviceMonitor/m/deviceMonitor/getOrgName");
  },

  /**
   * 查询床位
   */
  getBedroomTreeWithBeds(bebId){
    return Vue.http.get("/deviceMonitor/m/deviceMonitor/getBedroomWithBed/"+bebId);
  }

}
